<%@ Language=VBScript %>
<script language=vbscript runat=server>
Function LayIDCB(bStr )
    bStr = Trim(bStr)
    Dim bSo 
    bSo = InStr(1, bStr, "_ID", vbTextCompare)
    If bSo Then
        LayIDCB = Mid(bStr, bSo + 3)
    End If
End Function
</script>
<%	
	set Conn=server.CreateObject("ADODB.Connection")
	Conn.Open application("StrConn")	
	nodeid=GiaiMa(Request("nodeid"))
	userid=LayIDCB(request("canbo"))
	IDFlow=request("IDFlow")
	Yeucau=Request("Yeucau")
	ykien=Request("ykien")
	thoihan=Request("txtthoihan")
	sSQL = "Update TvFlowNode set Nguoixuly='" & userid & "',yeucauxuly='" & yeucau & "',hanxuly='"& thoihan &"',ykien='"& ykien &"',ktuser='1' where maworkflownode like '" & nodeid & "'"
	conn.Execute sSQL
	conn.Close	
	set conn=nothing

	lnk="../frmTvflowNode.asp?IDFlow="& IDFlow
	Response.Redirect(lnk)
%>
<script language=vbscript runat=server>
		Function GiaiMa(msText) 
	    Dim nC
	    Dim nD
	    Dim nE
	    Dim lA
	    Dim lB
	    Dim lI
	    Dim lJ
	    Dim lK
	    Dim sB
	    lA = Len(msText)
	    lB = lA - 1 - (lA - 1) \ 4
	    sB = Space(lB)
	    For lI = 1 To lB
	        lJ = lJ + 1
	        nC = Asc(Mid(msText, lJ, 1)) - 59	        
	        Select Case lI Mod 3
	        Case 1
	            lK = lK + 4
	            If lK > lA Then lK = lA
	            nE = Asc(Mid(msText, lK, 1)) - 59
	            nD = ((nE \ 16) And 3) * 64
	        Case 2
	            nD = ((nE \ 4) And 3) * 64
	        Case 0
	            nD = (nE And 3) * 64
	            lJ = lJ + 1
	        End Select
	        sB=Mid(sB,1,lI-1) & Chr(nC Or nD) & Mid(sB,lI+1,len(sB)-lI)
	    Next
	    GiaiMa = sB
	End Function
</script>
